Filter hook 'rest_{$this->taxonomy}_collection_params'
in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php at line 1193
Description
Filters collection parameters for the terms controller. The dynamic part of the filter `$this->taxonomy` refers to the taxonomy slug for the controller. This filter registers the collection parameter, but does not map the collection parameter to an internal WP_Term_Query parameter. Use the `rest_{$this->taxonomy}_query` filter to set WP_Term_Query parameters.
Occurrences
Filename |
Line Number |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php |
1193 |
Parameters
Type |
Name |
Description |
array |
$query_params |
JSON Schema-formatted collection parameters. |
WP_Taxonomy |
$taxonomy |
Taxonomy object. |
PHP Doc
/**
* Filters collection parameters for the terms controller.
*
* The dynamic part of the filter `$this->taxonomy` refers to the taxonomy
* slug for the controller.
*
* This filter registers the collection parameter, but does not map the
* collection parameter to an internal WP_Term_Query parameter. Use the
* `rest_{$this->taxonomy}_query` filter to set WP_Term_Query parameters.
*
* @since 4.7.0
*
* @param array $query_params JSON Schema-formatted collection parameters.
* @param WP_Taxonomy $taxonomy Taxonomy object.
*/